<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>个人网上银行</title>

<link rel="stylesheet" href="css/myFile.css" type="text/css"></link>
<link rel="stylesheet" href="css/publicFile.css" type="text/css"></link>

<script type="text/javascript" src="js/jquery-3.1.0.min.js"></script>
</head>

<body>
	<div class="main_div">
		<div class="out_border">
			<div class="div_top main_div padding_top20">
				<div>
					<div class="float_left">
						<label name="loginAccount">卡号:${mapAcount.loginAccount }</label>
					</div>
					<div class="float_left" style="padding-left:20%;">
						<a href="#">退出登录</a>
					</div>
					<div class="clear_float"></div>
				</div>
			</div>

			<div class="padding_top20">
				<div class="div_left float_left" style="text-align: left;">
					<div class="padding_top20">
						<a href="bankOnlineBalanceAction?id = ${mapAcount.id }">查询余额</a>
					</div>
					<div class="padding_top20">
						<a href="transfer.jsp">转账</a>
					</div>
					<div class="padding_top20">
						<a href="select.jsp">查询交易记录</a>
					</div>
					<div class="padding_top20">
						<a href="changepwd.jsp">修改密码</a>
					</div>
					<div class="clear_float"></div>
				</div>

				<div class="div_right float_left main_div">
					<h4>当前操作:查询交易记录。请选择时间范围后"查询"按钮</h4>
					<form action="bankOnlineSearchAction" method="post">
						<div>
							<label>查询日期范围:</label> <input type="date" name="beforedate"
								value="${beforedate }" /> <span>到</span> <input type="date"
								name="afterdate" value="${afterdate }" /> <input type="submit"
								value="查询" />
						</div>
					</form>
					<c:if test="${not empty list }">
						<div>
							<div>
								<ul>

									<li class="content_li">交易日期</li>
									<li class="content_li">支出</li>
									<li class="content_li">存入</li>
									<li class="content_li">账户余额</li>
									<li class="content_li">交易类型</li>
									<li class="content_li">备注</li>
									<li class="clear_float"></li>
								</ul>

								<ul>
									<c:forEach items="${list }" var="list" varStatus="i">
										<li class="content_li">${list.transactionDate }</li>
										<li class="content_li">${list.expense }</li>
										<li class="content_li">${list.income }</li>
										<li class="content_li">${list.balance }</li>
										<li class="content_li">${list.transactionType }</li>
										<li class="content_li">${list.remark }</li>
										<li class="clear_float"></li>
									</c:forEach>
								</ul>
							</div>

							<div class="clear_float"></div>
							<div>
								<a href="bankOnlineSearchAction?indexPage=1&beforedate=${beforedate }&afterdate=${afterdate }">首页</a> <a>|</a>
								<c:if test="${indexPage != 1 }">
									<a href="bankOnlineSearchAction?indexPage=${indexPage-1 }&beforedate=${beforedate }&afterdate=${afterdate }">上一页</a>
								</c:if>
								<c:if test="${indexPage == 1 }">
									<a href="bankOnlineSearchAction?indexPage=${indexPage}&beforedate=${beforedate }&afterdate=${afterdate }">上一页</a>
								</c:if>
								<a>|</a>
								<c:if test="${indexPage != totalPage }">
									<a href="bankOnlineSearchAction?indexPage=${indexPage+1}&beforedate=${beforedate }&afterdate=${afterdate }">下一页</a>
								</c:if>
								<c:if test="${indexPage == totalPage }">
									<a href="bankOnlineSearchAction?indexPage=${totalPage}&beforedate=${beforedate }&afterdate=${afterdate }">下一页</a>
								</c:if>
								<a>|</a> <a
									href="bankOnlineSearchAction?totalTable=${totalTable }&beforedate=${beforedate }&afterdate=${afterdate }">末页</a>
								第${indexPage }页/共${totalPage }页(${totalTable }条记录)
							</div>

						</div>
					</c:if>
					<c:if test="${not empty list }">
						<div style ="margin-top:20%;"><h2>欢迎使用个人网上银行</h2></div>
					</c:if>
				</div>
			</div>
		</div>
	</div>
</body>
</html>
